package com.company.utils;

public class OutputList {
    public static void main(String[] args) {
        int[][] ints2 = new int[2][4];
        for(int i = 0;i<ints2.length;i++){
            for(int j=0;j<ints2[0].length;j++){
                ints2[i][j] = (int) Math.floor(Math.random()*100);
            }
        }

        myToString(ints2);
        System.out.println();
        listToString(ints2[0]);
        listToString(ints2[1]);
    }
    public static void listToString(int[] list){
        for(int i:list){
            if(i!=0)
                System.out.print(i+"\t");
        }
        System.out.println();
    }
    public static void listToString(byte[] list){
        for(byte i:list){
            if(i!=0)
                System.out.print(i+"\t");
        }
        System.out.println();
    }

    public static void listToString(long[] list){
        for(long i:list){
            if(i!=0)
                System.out.print(i+"\t");
        }
        System.out.println();
    }
    public static void myToString(int[][] ints2) {
        for (int[] intLine : ints2){
            for(int i : intLine){
                System.out.print(i+"\t");
            }
            System.out.println();
        }
    }
}
